<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<div title="维护盗抢车信息" id="stealRobVehicleSelectDialog" class="dialogtitle">
	<form id="frmStealRobVehicle" onSubmit="return false">
		<div class="searchbox">
			<span class="fontRed">注:</span>带"<span class="fontRed">*</span>"为必填项
			<input type="hidden" name="id" value="<c:out value="${stealRobVehicle.id}"></c:out>"/>
			<table id="stealRobVehicleTable" cellspacing="0" cellpadding="0">
				<tr>
					<td align="right" style="width: 114px;">号牌号码：<span	class="fontRed">*</span></td>
					<td><input type="text" id="editPlateNum" name="plateNum" value="<c:out value='${stealRobVehicle.plateNum}'/>"/></td>
					<td align="right" style="width: 114px;">号牌种类：<span class="fontRed">*</span></td>
					<td style="width: 230px; ">
						<select id="editPlateType" name="plateTypeId">
							<option value="">---请选择---</option>
							<c:forEach items="${lstLicencePlateKind}" var="plateType">
								<option value="${plateType.id}" ${plateType.id == stealRobVehicle.plateTypeId ? "selected" : ""}><c:out value="${plateType.name}"/></option>
							</c:forEach>
						</select> 
					</td>
					<td><button onclick="ajaxFindVehicleCommon()">获取机动车信息</button></td>
				</tr>
			</table>
		</div>
		<table style="border-top-width:1px;" class="rvimsbordercolor" cellspacing="0" cellpadding="0">
			<tr>
				<td><%@ include file="../vehicle/vehicleCommonView.jsp"%></td>
				<td valign="top">
					<table cellspacing="0" cellpadding="0">
						<tr>
							<td style="height: 343px;padding-left: 30px; ">
								<h3>盗抢车辆信息</h3>
						    	<table cellspacing="0" cellpadding="0">
						    		<tr>
							    		<td rowspan="8" style="width: 140px; height: 100px">
											<img src="http://t2.gstatic.com/images?q=tbn:ANd9GcQPVzYsWtUoKnZ4Gg9jFHticUh-YAPqN2KNprlXL0jsItLlZqvY" id="imageURL" width="250"  height="180" />
										</td>
									</tr>
									<tr>
										<td align="right" style="width: 114px;">号牌颜色：</td>
										<td style="width: 230px; ">
											<select id="plateColorId" name="plateColorId" >
												<option value="">---请选择---</option>
												<c:forEach items="${lstPlateColor}" var="plateColor">
													<option value="${plateColor.id}" ${plateColor.id == stealRobVehicle.plateColorId ? "selected" : ""}><c:out value="${plateColor.name }"/></option>
												</c:forEach>
											</select>
										</td>
									</tr>
									<tr>
										<td align="right" style="width: 114px;">车身颜色：</td>
										<td style="width: 230px; ">
											<select id="vehicleColorId" name="vehicleColorId">
												<option value="">---请选择---</option>
												<c:forEach items="${lstVehicleColor}" var="vehicleColor">
													<option value="${vehicleColor.id}" ${vehicleColor.id == stealRobVehicle.vehicleColorId ? "selected" : ""}><c:out value="${vehicleColor.name }"/></option>
												</c:forEach>
											</select>
										</td>
									</tr>
									<tr>
										<td align="right" style="width: 114px;">车辆类型：</td>
										<td style="width: 230px; ">
											<select id="vehicleTypeId" name="vehicleTypeId">
												<option value="">---请选择---</option>
												<c:forEach items="${lstVehicleType}" var="vehicleType">
													<option value="${vehicleType.id }" ${vehicleType.id == stealRobVehicle.vehicleTypeId ? "selected" : ""}><c:out value="${vehicleType.name}"></c:out></option>
												</c:forEach>
											</select>
										</td>
									</tr>
								    <tr>
										<td align="right" style="width: 114px;">车辆品牌：</td>
										<td><input type="text" id="vehicleBrand" name="vehicleBrand"  value="<c:out value='${stealRobVehicle.vehicleBrand}'/>"/></td>
									</tr>
									<tr>
										<td align="right" style="width: 114px;">车辆分类：</td>
										<td style="width: 230px; ">
											<select id="vehicleClassificationId" name="vehicleClassificationId">
												<option value="">---请选择---</option>
												<c:forEach items="${lstVehicleClassification}" var="vehicleClassification">
													<option value="${vehicleClassification.id }" ${vehicleClassification.id == stealRobVehicle.vehicleClassificationId ? "selected" : ""}><c:out value="${vehicleClassification.name}"></c:out></option>
												</c:forEach>
											</select>
										</td>
									</tr>
									<tr>
										<td align="right" style="width: 114px;">使用性质：</td>
										<td style="width: 230px; ">
											<select id="usingCharacterId" name="usingCharacterId">
												<option value="">---请选择---</option>
												<c:forEach items="${lstUseNature}" var="useNature">
													<option value="${useNature.id }" ${useNature.id == stealRobVehicle.usingCharacterId ? "selected" : ""}><c:out value="${useNature.name}"></c:out></option>
												</c:forEach>
											</select>
										</td>
									</tr>
									<tr>
										<td align="right" style="width: 114px;">检定日期：</td>
										<td style="width: 230px; ">
											<input type="text" id="certificationDate" name="certificationDate" class="date" readonly="readonly" value="<c:out value='${stealRobVehicle.certificationDate}'/>"/>
										</td>
									</tr>	
									<tr>
										<td style="width: 230px;">
											<input type="file" name="imageURL" id="fileField" style="width: 230px;" onchange="readURL(this);" />
										</td>
									</tr>			
					    		</table>
							</td>
						</tr>
						<tr>
							<td style="border-top-width:1px; border-top-style: dashed;padding-left: 30px;" class="rvimsbordercolor">
								<br><br><br>
								<span class="fontRed">提示：</span>1.图片大小不能大于1M<br>
								2.图片格式为：jpg、jpeg、gif、png、bmp
							</td>
						</tr>
					</table>
				</td>
			</tr>
	   </table>
   </form>
   <div id="infoStealRobVehicle" class="fontRed"></div>
</div>
<script>
	$("button").button();
	$(".date").datepicker();
	$(".date").datepicker({regional:"zh-CN"});
	ajaxFindVehicleCommon();
	function readURL(input) {
		if (input.files && input.files[0]) {
			var reader = new FileReader();
			reader.onload = function (e) {
				$('#imageURL').attr('src', e.target.result).width(250).height(180);
			};
			reader.readAsDataURL(input.files[0]);
		}
	}
</script>
